07. How to Use a Deployed Model

How to use a Deployed Model

Deployment L3 C5b V1

As mentioned earlier, there are two obstacles we are going to need to overcome. The first is the security issue and the second is data processing. The way that we are going to approach solving these issues is by making use of Amazon Lambda and API Gateway.

The structure for our web app will look like the diagram below.

What this means is that when someone uses our web app, the following will occur.

  1. To begin with, a user will type out a review and enter it into our web app.

  2. Then, our web app will send that review to an endpoint that we created using API Gateway. This endpoint will be constructed so that anyone (including our web app) can use it.

  3. API Gateway will forward the data on to the Lambda function

  4. Once the Lambda function receives the user's review, it will process that review by tokenizing it and then creating a bag of words encoding of the result. After that, it will send the processed review off to our deployed model.

  5. Once the deployed model performs inference on the processed review, the resulting sentiment will be returned back to the Lambda function.

  6. Our Lambda function will then return the sentiment result back to our web app using the endpoint that was constructed using API Gateway.

Don't forget!

Currently our endpoint is running. The reason for this is that in the next few videos we are going to interact with our deployed endpoint. If you are following along, don't forget that your endpoint is running. If you need to take a break, don't forget to shut down your endpoint!